{include file="Include/H_ui_head" /}
<title>关于我们修改</title>
</head>
<body>
<article class="page-container">
    <script type="text/javascript" src="ADMIN_JS/nicEdit.js?v=122"></script>
    <script type="text/javascript">
        bkLib.onDomLoaded(function() { nicEditors.allTextAreas(); new nicEditor({iconsPath : 'nicEditorIcons.gif'}).panelInstance('content');});
    </script>
    <form action="javascript:;" method="POST" class="form form-horizontal" id="submit">
        <div class="row cl">
            <label class="form-label col-sm-3"><span class="c-red">*</span>类型：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="radio" name="status" id="status" value="0" {if $result['status'] == 0}checked{/if}>中文
                <input type="radio" name="status" id="status" value="1" {if $result['status'] == 1}checked{/if}>英文
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-sm-3"><span class="c-red">*</span>公司简介：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <!-- <textarea name="content" id="content" cols="90" rows="30"></textarea> -->
                <script id="editor" type="text/plain" style="width:1024px;height:500px;">{$result['content']}</script>
            </div>
        </div>

        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <input type="hidden" name="hid" value="">
                <button type="button" class="btn btn-success radius"
                        id="admin-role-save" name="admin-role-save" onclick="return reject()" >
                    <i class="icon-ok"></i>确定</button>
            </div>

            <input type="hidden" value="{$result['id']}" id="intrduce_id" name="intrduce_id">
        </div>
    </form>
</article>
{include file="include/H_ui_foot" /}
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="ADMIN_JS/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="ADMIN_JS/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" src="ADMIN_JS/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" src="__LIB__/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="__LIB__/jquery.validation/1.14.0/jquery.validate.js"></script>
<script type="text/javascript" src="__LIB__/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="__LIB__/jquery.validation/1.14.0/messages_zh.js"></script>
<script type="text/javascript">
    UE.getEditor('content',{initialFrameWidth:800,initialFrameHeight:200})
    var ue = UE.getEditor('editor');
</script>
<script type="text/javascript">
    $(function(){
        // UE.getEditor('editor').getAllHtml()
        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });

        $("#form-member-add").validate({
            rules:{
                content:{
                    required:true,
                    minlength:6,
                },
            },
            onkeyup:false,
            focusCleanup:true,
            success:"valid",
            /*submitHandler:function(form){
             $(form).ajaxSubmit(ajax_option);
             var index = parent.layer.getFrameIndex(window.name);
             parent.$('.btn-refresh').click();
             parent.layer.close(index);
             }*/
        });


    });
</script>
<script type="text/javascript">
    function reject()
    {
        // var ue = UE.getEditor('content');
        //    var str = ue.getContent();
        var ids = $("#intrduce_id").val();
        if(ids != ""){
            var url = "{:url('Platform/edit_intrduce')}";
        }else{
            var url = "{:url('Platform/add_intrduce')}";
        }

        var content =  ue.getContent();

        var status = $("input[name='radio']:checked").val();

        // var title = $("#title").val();
        var status = $("#status").val();
        var loading =layer.msg('正在提交数据，请稍后...',{time:5000});
        $.post(url,{content:content,status:status,ids:ids},function(data){
            layer.close(loading);
            if(data.code=='1'){
                layer.msg(data.message,{time:2000});
                setTimeout(function(){
                    location.reload();
                },1000);
            }else{
                layer.msg(data.message,{time:2000});
            }
        });
    }
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
